-
Notifications
You must be signed in to change notification settings - Fork 42
feat(policies): gated policy attachments #2622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Jose I. Paris <[email protected]>
Signed-off-by: Jose I. Paris <[email protected]>
Signed-off-by: Jose I. Paris <[email protected]>
|
A couple of questions
|
migmartri
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jiparis
I left a couple of comments, I am interested in knowing how this behavior related to our current policy enforcement mechanism, as in if the data is sent to chainloop, marked as enforced, etc.
app/cli/cmd/attestation_push.go
Outdated
| logger.Warn().Msg(exceptionBypassPolicyCheck) | ||
| continue | ||
| } | ||
| return fmt.Errorf("your contract requires the policy %q to pass before continuing", eval.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we return ErrBlockedByPolicyViolation so a custom error that also returns code error 3 or 4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just implemented a custom error. It now returns a 4
Signed-off-by: Jose I. Paris <[email protected]>
Signed-off-by: Jose I. Paris <[email protected]>
|
It would be nice if we could also add next to the policy information if it's a |
Signed-off-by: Jose I. Paris <[email protected]>
Signed-off-by: Jose I. Paris <[email protected]>
This PR allows to configure individual policy evaluations as attestation gates during
att pushoperations. A newgateproperty has been added to the policy attachment:Example contract:
Example policy:
Attestation process:
Note that this setting is independent to the global policy violation strategy configured at the org level.